package ctn.event.processor;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import ctn.contant.PlugContant;
import ctn.dao.inteface.CPAInfoDao;
import ctn.event.CTNEventAddPJ;
import ctn.hibernate.po.CtnCpaVer;
@Component(value="addPJProcessor")
public class AddPJProcessor implements EventProcessor<CTNEventAddPJ> {
	@Autowired
	private CPAInfoDao cPAInfoDaoImpl;
	@Override
	public void process(CTNEventAddPJ event) {
		CtnCpaVer ver=new CtnCpaVer();
		ver.setId(Long.parseLong(event.getVerID()));
		ver.setStatus(PlugContant.STATUS_WAIT);
		ver.setEffDate(new Date());
		cPAInfoDaoImpl.updateCpaVer(ver);
		
	}

}
